<template>
    <div class="container">
        <h3>出库列表</h3>
            
            <el-table
                :data="tableData"
                border
                style="margin-top:20px;"
                ref="multipleTable"
                header-cell-class-name="table-header"
            >
                <el-table-column prop="deliverTime" sortable label="下单时间"></el-table-column>
				<el-table-column prop="clientName" sortable label="客户名称"></el-table-column>
                <el-table-column prop="orderNo" sortable label="订单号"></el-table-column>
				<el-table-column prop="totalAmount" sortable label="金额"></el-table-column>
                <el-table-column label="操作" width="150" align="center">
                    <template slot-scope="scope">
                        <el-button
                            type="text"
                            
                            @click="handleEdit(scope.$index, scope.row)"
                        >出库</el-button>
                     
                    </template>
                </el-table-column>
            </el-table>
            <el-pagination layout="total, prev, pager, next, jumper" :page-size="pagesize" :current-page.sync="currentPage" :total="total"  @current-change="handleCurrentChange" style="margin-top:20px"></el-pagination>
    
    </div>
</template>

<script>
import {clientorder_storage_orders} from "@/request/api"
    export default {
        data() {
            return {
                total:0,
                currentPage:1,
                pagesize:10,
           
                tableData: [],
                form: {},
              
                action:'',
            };
        },
        created(){
            
        },
        mounted(){
			this.id = this.$route.query.id
            this.init();
        },
        methods: {
           
            handleCurrentChange(val){
                this.currentPage = val
                this.init()
            },
            init(){
                let data = {
                    pageno:this.currentPage,
					pagesize:10,
					relateId:this.id
                }
                clientorder_storage_orders(data).then((res)=>{
                    this.tableData = res.rows
                    this.total = res.total
                })
            },
		
            //跳转编辑页面
            handleEdit(index,row){
                this.$router.push({
					path:'/warehouseManagement/forOutBound',
					query:{id:row.id}
				})
            },
      
          
           
        }
    }
</script>

<style scoped lang="less">
/deep/.upload-daoru{
    background: #eee;
    .el-upload{
        border: none;
        width: auto;
        height: auto;
        border-radius: 0;
        float: right;
        margin-right: 10px
    }
}
.el-table{ margin-top: 20px;}
 .el-pagination{
    text-align: center;
}
.el-pagination{
    text-align: center;
}
.el-col{
    margin-bottom:0;
}
</style>